package com.wwt.springboot_vue.mapper;

import com.wwt.springboot_vue.bean.Goods;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface GoodsMapper {
    List<Goods> findAllGoods();
    List<Goods> findByLike(String query);
    List<Goods> findById(int goods_id);
    void delete(int goods_id);
    void add(@Param("goods_name") String goods_name,
             @Param("goods_price") int goods_price,
             @Param("goods_number") int goods_number,
             @Param("goods_intro") String goods_intro,
             @Param("goods_status")String goods_status,
             @Param("category_id")int category_id,
             @Param("goods_img")  String goods_img);
    void update(Goods goods);
    List<Goods> findByLimit(int start,int size);
    List<Goods> findByLikeLimit(String query ,int start,int size);
}
